CC := gcc
CFLAGS := -Wall -I/usr/include/lua5.3
LDFLAGS := -shared -llua5.3 -luci
TARGET := uci.so
SOURCES := ./src/uci.c

# 默认目标
all: clean $(TARGET)

# 编译目标
$(TARGET): $(SOURCES)
	$(CC) $(CFLAGS)  $(SOURCES) -o $(TARGET)  $(LDFLAGS)

# 安装目标
install:
	mkdir -p /usr/local/lib/lua/5.3
	cp $(TARGET) /usr/local/lib/lua/5.3

# 清理目标
clean:
	rm -f $(TARGET)
